package com.coin900.coin.service.sop;

import com.coin900.coin.persist.sop.SopMenuVO;
import com.value.mybatis.IDaoRouter;
import com.value.mybatis.Pagination;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author shui
 * @create 2018-01-05
 **/
@Service
public class SopMenuService implements ISopMenuService {

    @Override
    public List<SopMenuVO> loadSopMenu(Map<String, Object> params) {
        return this.daoRouter.query("SopMenu.loadSopMenu", params);
    }

    @Override
    public List<SopMenuVO> loadSopMenuForPage(Pagination pagination) {
        return this.daoRouter.query("SopMenu.loadSopMenuForPage", pagination);
    }

    @Override
    public void insertSopMenu(SopMenuVO sopMenuVO) {
        this.daoRouter.insert("SopMenu.insertSopMenu", sopMenuVO);
    }

    @Override
    public void updateSopMenu(SopMenuVO sopMenuVO) {
        this.daoRouter.update("SopMenu.updateSopMenu", sopMenuVO);
    }

    @Override
    public void deleteSopMenu(SopMenuVO sopMenuVO) {
        this.daoRouter.update("SopMenu.deleteSopMenu", sopMenuVO);
    }

    @Autowired
    private IDaoRouter daoRouter;

}